<div id="detail" class="displaynone">
    <div>
<!-- 角色详情页 -->
<div class="row" style="margin-top:20px;margin-bottom:20px;" v-show="loading">
    <div class="loader">
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
        <div class="dot"></div>
    </div>
</div>
<div class="row" style="margin-top:20px;margin-bottom:20px;" v-show="!loading">
    <div class="col-md-8">
        <table class="table table-hover table-bordered">
            <tbody>
            <tr>
                <th width="16%">酒店名称</th>
                <td>{{oneData.title}}</td>
            </tr>
            <tr>
                <th width="16%">酒店地址</th>
                <td>{{oneData.address}}</td>
            </tr>
            <tr>
                <th width="16%">备注</th>
                <td>{{oneData.memo_info}}</td>
            </tr>
            <tr>
                <th width="16%">当前管理员</th>
                <td>{{oneData.adminlist}}</td>
            </tr>
            </tbody>
        </table>
        <div class="row">
            <div class="col-md-6 col-md-offset-2">
                <router-link to="/"><button type="button" class="btn btn-default active">返回</button></router-link>
            </div>
        </div>
    </div>
</div>
    </div>
</div>

<script>
    var detaildata={
        loading:true,
        Id:0,
        oneData:{}
    };

    const Detail = {
        template:$('#detail').html(),
        data:function () {
            return detaildata;
        },
        created () {
            this.loading = true;
            this.Id = this.$route.params.id;
            this.fetchData();
        },
        methods:{
            fetchData:function(){
                var _self=this;
                $.ajax({
                    url: "/hotel/hotel/getInfo?id="+_self.Id.id,
                    type: "get",
                    dataType:'json',
                    success:function(data){
                        if(data.status==1){
                            _self.oneData = {};
                            _self.oneData = data.data;
                            setTimeout(function(){_self.loading=false;},1000);
                        }
                    },
                    error:function(){alert('获取数据失败，请重试！');},
                })
            }
        }
    }
</script>